﻿using System;
using System.ComponentModel.DataAnnotations;

namespace RIABlog.Web.Models
{
    /// <summary>
    /// Блог
    /// </summary>
    public class Blog : BaseEntity
    {
		[Display(Name = "BlogTitle", ResourceType = typeof(FieldDisplayNames))]
		[Required(AllowEmptyStrings = false, ErrorMessageResourceName = "BlogTitleErrorMessage", ErrorMessageResourceType = typeof(FieldDisplayNames))]
		[RegularExpression("^[^/:*?<>|\\x5C\\x22]*$", ErrorMessageResourceName = "BlogTitleErrorMessage", ErrorMessageResourceType = typeof(FieldDisplayNames))]
		public string Title { get; set; }

		[Display(AutoGenerateField = false)]
		public string Author { get; set; }

		[Display(AutoGenerateField = false)]
		public DateTime TimeCreated { get; set; }

		[Display(AutoGenerateField = false)]
		public DateTime TimeLastPosted { get; set; }
    }
}